<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Episode_script_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-episode_script_id" data-rule="required" data-source="episode/script/index" class="form-control selectpage" name="row[episode_script_id]" type="text" value="">
        </div>
    </div> -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Episode_chapter_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-episode_chapter_id" data-rule="required" data-source="episode/chapter/index" {if $get_params.episode_chapter_id} data-params='{"custom[id]":"{$get_params.episode_chapter_id}"}'{/if} class="form-control selectpage" name="row[episode_chapter_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Episode_info_ids')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-episode_info_ids" data-source="episode/info/index" data-multiple="true" {if $get_params.episode_chapter_id} data-params='{"custom[episode_chapter_id]":"{$get_params.episode_chapter_id}"}'{/if} class="form-control selectpage" name="row[episode_info_ids]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Episode_video_ids')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-episode_video_ids" data-source="episode/info/index" data-multiple="true" {if $get_params.episode_chapter_id} data-params='{"custom[episode_chapter_id]":"{$get_params.episode_chapter_id}","custom[type]":1}'{/if} class="form-control selectpage" name="row[episode_video_ids]" type="text" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" name="row[name]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-type" class="form-control selectpicker" name="row[type]">
                {foreach name="typeList" item="vo"}
                    <option value="{$key}" {in name="key" value="1"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Episode_character_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-episode_character_id" data-rule="required" data-source="episode/character/index" {if $get_params.episode_script_id} data-params='{"custom[episode_script_id]":"{$get_params.episode_script_id}","custom[status]":1}'{/if} class="form-control selectpage" name="row[episode_character_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Cardiac_value')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-cardiac_value" class="form-control" name="row[cardiac_value]" type="number" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Money')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-money" class="form-control" name="row[money]" type="number" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-image" class="form-control" size="50" name="row[image]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-image"></ul>
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">媒资文件ID:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-media_id" class="form-control" name="row[media_id]" type="number" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Thumbnail')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-thumbnail" class="form-control" size="50" name="row[thumbnail]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-thumbnail" class="btn btn-danger faupload" data-input-id="c-thumbnail" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-thumbnail" class="btn btn-primary fachoose" data-input-id="c-thumbnail" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-thumbnail"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-thumbnail"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('File')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-file" class="form-control" size="50" name="row[file]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-file" class="btn btn-danger faupload" data-input-id="c-file" data-multiple="false" data-preview-id="p-file"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-file" class="btn btn-primary fachoose" data-input-id="c-file" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-file"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-file"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('File_2k')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-file_2k" class="form-control" size="50" name="row[file_2k]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-file_2k" class="btn btn-danger faupload" data-input-id="c-file_2k" data-multiple="false" data-preview-id="p-file_2k"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-file_2k" class="btn btn-primary fachoose" data-input-id="c-file_2k" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-file_2k"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-file_2k"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('File_1080p')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-file_1080p" class="form-control" size="50" name="row[file_1080p]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-file_1080p" class="btn btn-danger faupload" data-input-id="c-file_1080p" data-multiple="false" data-preview-id="p-file_1080p"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-file_1080p" class="btn btn-primary fachoose" data-input-id="c-file_1080p" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-file_1080p"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-file_1080p"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('File_720p')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-file_720p" class="form-control" size="50" name="row[file_720p]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-file_720p" class="btn btn-danger faupload" data-input-id="c-file_720p" data-multiple="false" data-preview-id="p-file_720p"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-file_720p" class="btn btn-primary fachoose" data-input-id="c-file_720p" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-file_720p"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-file_720p"></ul>
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Dao_num')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-dao_num" class="form-control" name="row[dao_num]" type="text" value="5">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Mental_activity')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-mental_activity" class="form-control" name="row[mental_activity]" type="text" value="">
        </div>
    </div>
    <video id='video-file' src='' style="display:none;"></video>
    <input id="c-file_num" style="display: none;" class="form-control" name="row[file_num]" type="text" value="0">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Blurb')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-blurb" class="form-control " rows="5" name="row[blurb]" cols="50"></textarea>
        </div>
    </div>
    <div class="form-group row">
        <label class="control-label col-xs-12 col-sm-2">{:__('Json')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <table class="table fieldlist" data-name="row[json]" data-template="row[json]tpl" id="second-table">
                <tr>
                    <!-- <td>{:__('json id')}</td> -->
                    <td>{:__('json name')}</td>
                    <td>{:__('json num')}</td>
                    <td width="90">{:__('Operate')}</td>
                </tr>
                <tr><td colspan="4">
                <a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a>
                <textarea name="row[json]" class="form-control hide" cols="30" rows="5"></textarea>
                </td></tr>
            </table>
            <script type="text/html" id="row[json]tpl">
                <tr>
                    <td><input type="text" name="<%=name%>[<%=index%>][id]" class="form-control selectpage" {if $get_params.episode_script_id} data-params='{"custom[episode_script_id]":"{$get_params.episode_script_id}"}'{/if} data-source="episode/character/index" value="<%=row.id%>"/></td>
                    <!-- <td><input type="text" name="<%=name%>[<%=index%>][name]" class="form-control" value="<%=row.name%>"/></td> -->
                    <td><input type="text" name="<%=name%>[<%=index%>][num]" class="form-control" value="<%=row.num%>"/></td>
                    <td width="90">
                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                    </td>
                </tr>
            </script>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('X_value')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-x_value" class="form-control" name="row[x_value]" type="text" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Y_value')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-y_value" class="form-control" name="row[y_value]" type="text" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('System_level_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-system_level_id" data-source="system/level/index" class="form-control selectpage" name="row[system_level_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('System_prop_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-system_prop_id" data-source="system/prop/index" class="form-control selectpage" name="row[system_prop_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Episode_producer_num')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-episode_producer_num" class="form-control" name="row[episode_producer_num]" type="number">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Cardiac_qualify_value')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-cardiac_qualify_value" class="form-control" name="row[cardiac_qualify_value]" type="number">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Version_type')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-version_type" class="form-control selectpicker" name="row[version_type]">
                {foreach name="versionTypeList" item="vo"}
                    <option value="{$key}" {in name="key" value="1"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_banner')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-is_banner" class="form-control selectpicker" name="row[is_banner]">
                {foreach name="bannerList" item="vo"}
                    <option value="{$key}" {in name="key" value="1"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-create_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
